<?php
if(!isset($_SESSION['user'])){
redirect(LOGIN);
}
$model = new Model();

$model->select = "id, name";
$model->order = "name ASC";
$model->where = "username = '" . $_SESSION['user']['username'] . "'";
$model->getdata('album');
$data['albums'] = $model->fetchAll();

$model->select = "id, name, p_id";
$model->where = "video_type = 1";
$model->order = "thutu ASC";
$model->getdata('category');
$resultArr = $model->fetchAll();

recursive($resultArr, 0 , 1, $data['categories']);


loadview('template/header_admin',$data);
loadview('user/post_video',$data);
loadview('template/footer_admin',$data);
exit();

?>
